Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Finder Guide /
Chapter 2 - Finder Objects / Object Class Definitions


Group

An object of class Group is a group file in the Users & Groups control panel window. The Finder can't recognize or create a group unless the Users & Groups control panel window is open.

PROPERTIES
bounds
The coordinates of the rectangle that bounds the content region of the item's icon.
Class: List of four integers (Bounding Rectangle data type). The first two integers specify the coordinates of the upper-left corner of the item's icon, and the last two integers specify the coordinates of the lower-right corner of the icon.
Modifiable? Yes
icon
A bitmap of the item's icon.
Class: Icon family (data type defined by Finder)
Modifiable: Yes
label index
The number of the label currently selected for the item in the Label menu (None = 0).
Class: Integer
Modifiable: Yes
name
The group's name.
Class: String
Modifiable: Yes
position
Two integers that specify the position of the upper-left corner of the group's icon.
Class: List of two integers (Point data type) that specify the coordinates of the upper-left corner of the group's icon
Modifiable? Yes
ELEMENT CLASSES
None

COMMANDS HANDLED
Clean Up, Close, Count, Data Size, Exists, Get, Make, Open, Select, Sort, Update

DEFAULT VALUE CLASS RETURNED
A reference to a group or, if you use the plural form groups, a list of references.

EXAMPLE
This script displays a dialog box requesting the name of the new group to create, then opens the control panel Users & Groups, creates the new group, and sets its name:

tell application "Finder"   set response to display dialog ¬
      "Name of new group:" default answer ""   set newGroup to text returned of response
   set cPanels to control panel "Users & Groups" of ¬
      control panels folder
   open cPanels
   make group at cPanels with properties {name: newGroup}
end tell

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996